#!/bin/sh

# 打包并上传web版到服务器
# 本地路径
DIST=dist
# 本地路径
TARGET_DIST=../../../bytedesk-private/starter/src/main/resources/templates/agent
DEPLOY_DIST=../../../bytedesk-private/deploy/server/agent

# 打包完，复制
yarn build:open && \
# 将dist文件夹复制到bytedesk-private/starter/src/main/resources/templates/文件夹中，并重命名为agent
rm -fr $TARGET_DIST && \
cp -r ./$DIST $TARGET_DIST && \
# 将dist文件夹复制到bytedesk-private/deploy/server/agent/文件夹中
cp -r ./$DIST $DEPLOY_DIST
